package com.navi.entity;

import com.alibaba.fastjson.annotation.JSONField;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by windson on 2017/9/15.
 */
//@Entity
//@Table(name = "m_eqpt_d", schema = "dm", catalog = "")
public class MEqptD extends BaseEntity {
    private int eqptKey;
    private String unqSeqId;
    private Timestamp etlTimestamp;
    private String etlEventName;
    private String etlEventNode;
    private String etlEvtSeqId;
    private Integer shopKeyFk;
    @JSONField(name = "shop_id")
    private String shopId;
    @JSONField(name = "eqpt_id")
    private String eqptId;
    private String eqptDsc;
    @JSONField(name = "unit_typ")
    private String unitTyp;
    private Integer upEqptKey;
    @JSONField(name = "up_eqpt_id")
    private String upEqptId;
    private String eqptCate;
    private String floorCode;
    private String eqptTrnsCate;
    private String eqptIp;
    private String dept;
    private String evtCate;
    private String evtUser;
    private Timestamp evtTimestamp;
    private String evtNote;

    @Id
    @Column(name = "EQPT_KEY")
    @JSONField(name = "EQPT_KEY")
    public int getEqptKey() {
        return eqptKey;
    }

    public void setEqptKey(int eqptKey) {
        this.eqptKey = eqptKey;
    }

    @Basic
    @Column(name = "UNQ_SEQ_ID")
    public String getUnqSeqId() {
        return unqSeqId;
    }

    public void setUnqSeqId(String unqSeqId) {
        this.unqSeqId = unqSeqId;
    }

    @Basic
    @Column(name = "ETL_TIMESTAMP")
    @JSONField(name = "ETL_TIMESTAMP")
    public Timestamp getEtlTimestamp() {
        return etlTimestamp;
    }

    public void setEtlTimestamp(Timestamp etlTimestamp) {
        this.etlTimestamp = etlTimestamp;
    }

    @Basic
    @Column(name = "ETL_EVENT_NAME")
    public String getEtlEventName() {
        return etlEventName;
    }

    public void setEtlEventName(String etlEventName) {
        this.etlEventName = etlEventName;
    }

    @Basic
    @Column(name = "ETL_EVENT_NODE")
    public String getEtlEventNode() {
        return etlEventNode;
    }

    public void setEtlEventNode(String etlEventNode) {
        this.etlEventNode = etlEventNode;
    }

    @Basic
    @Column(name = "ETL_EVT_SEQ_ID")
    public String getEtlEvtSeqId() {
        return etlEvtSeqId;
    }

    public void setEtlEvtSeqId(String etlEvtSeqId) {
        this.etlEvtSeqId = etlEvtSeqId;
    }

    @Basic
    @Column(name = "SHOP_KEY_FK")
    @JSONField(name = "SHOP_KEY_FK")
    public Integer getShopKeyFk() {
        return shopKeyFk;
    }

    public void setShopKeyFk(Integer shopKeyFk) {
        this.shopKeyFk = shopKeyFk;
    }

    @Basic
    @Column(name = "SHOP_ID")
    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    @Basic
    @Column(name = "EQPT_ID")
    @JSONField(name = "EQPT_ID")
    public String getEqptId() {
        return eqptId;
    }

    public void setEqptId(String eqptId) {
        this.eqptId = eqptId;
    }

    @Basic
    @Column(name = "EQPT_DSC")
    public String getEqptDsc() {
        return eqptDsc;
    }

    public void setEqptDsc(String eqptDsc) {
        this.eqptDsc = eqptDsc;
    }

    @Basic
    @Column(name = "UNIT_TYP")
    public String getUnitTyp() {
        return unitTyp;
    }

    public void setUnitTyp(String unitTyp) {
        this.unitTyp = unitTyp;
    }

    @Basic
    @Column(name = "UP_EQPT_KEY")
    public Integer getUpEqptKey() {
        return upEqptKey;
    }

    public void setUpEqptKey(Integer upEqptKey) {
        this.upEqptKey = upEqptKey;
    }

    @Basic
    @Column(name = "UP_EQPT_ID")
    public String getUpEqptId() {
        return upEqptId;
    }

    public void setUpEqptId(String upEqptId) {
        this.upEqptId = upEqptId;
    }

    @Basic
    @Column(name = "EQPT_CATE")
    public String getEqptCate() {
        return eqptCate;
    }

    public void setEqptCate(String eqptCate) {
        this.eqptCate = eqptCate;
    }

    @Basic
    @Column(name = "FLOOR_CODE")
    public String getFloorCode() {
        return floorCode;
    }

    public void setFloorCode(String floorCode) {
        this.floorCode = floorCode;
    }

    @Basic
    @Column(name = "EQPT_TRNS_CATE")
    public String getEqptTrnsCate() {
        return eqptTrnsCate;
    }

    public void setEqptTrnsCate(String eqptTrnsCate) {
        this.eqptTrnsCate = eqptTrnsCate;
    }

    @Basic
    @Column(name = "EQPT_IP")
    public String getEqptIp() {
        return eqptIp;
    }

    public void setEqptIp(String eqptIp) {
        this.eqptIp = eqptIp;
    }

    @Basic
    @Column(name = "DEPT")
    @JSONField(name = "DEPT")
    public String getDept() {
        return dept;
    }

    public void setDept(String dept) {
        this.dept = dept;
    }

    @Basic
    @Column(name = "EVT_CATE")
    public String getEvtCate() {
        return evtCate;
    }

    public void setEvtCate(String evtCate) {
        this.evtCate = evtCate;
    }

    @Basic
    @Column(name = "EVT_USER")
    public String getEvtUser() {
        return evtUser;
    }

    public void setEvtUser(String evtUser) {
        this.evtUser = evtUser;
    }

    @Basic
    @Column(name = "EVT_TIMESTAMP")
    @JSONField(name = "EVT_TIMESTAMP")
    public Timestamp getEvtTimestamp() {
        return evtTimestamp;
    }

    public void setEvtTimestamp(Timestamp evtTimestamp) {
        this.evtTimestamp = evtTimestamp;
    }

    @Basic
    @Column(name = "EVT_NOTE")
    public String getEvtNote() {
        return evtNote;
    }

    public void setEvtNote(String evtNote) {
        this.evtNote = evtNote;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MEqptD mEqptD = (MEqptD) o;

        if (eqptKey != mEqptD.eqptKey) return false;
        if (unqSeqId != null ? !unqSeqId.equals(mEqptD.unqSeqId) : mEqptD.unqSeqId != null) return false;
        if (etlTimestamp != null ? !etlTimestamp.equals(mEqptD.etlTimestamp) : mEqptD.etlTimestamp != null)
            return false;
        if (etlEventName != null ? !etlEventName.equals(mEqptD.etlEventName) : mEqptD.etlEventName != null)
            return false;
        if (etlEventNode != null ? !etlEventNode.equals(mEqptD.etlEventNode) : mEqptD.etlEventNode != null)
            return false;
        if (etlEvtSeqId != null ? !etlEvtSeqId.equals(mEqptD.etlEvtSeqId) : mEqptD.etlEvtSeqId != null) return false;
        if (shopKeyFk != null ? !shopKeyFk.equals(mEqptD.shopKeyFk) : mEqptD.shopKeyFk != null) return false;
        if (shopId != null ? !shopId.equals(mEqptD.shopId) : mEqptD.shopId != null) return false;
        if (eqptId != null ? !eqptId.equals(mEqptD.eqptId) : mEqptD.eqptId != null) return false;
        if (eqptDsc != null ? !eqptDsc.equals(mEqptD.eqptDsc) : mEqptD.eqptDsc != null) return false;
        if (unitTyp != null ? !unitTyp.equals(mEqptD.unitTyp) : mEqptD.unitTyp != null) return false;
        if (upEqptKey != null ? !upEqptKey.equals(mEqptD.upEqptKey) : mEqptD.upEqptKey != null) return false;
        if (upEqptId != null ? !upEqptId.equals(mEqptD.upEqptId) : mEqptD.upEqptId != null) return false;
        if (eqptCate != null ? !eqptCate.equals(mEqptD.eqptCate) : mEqptD.eqptCate != null) return false;
        if (floorCode != null ? !floorCode.equals(mEqptD.floorCode) : mEqptD.floorCode != null) return false;
        if (eqptTrnsCate != null ? !eqptTrnsCate.equals(mEqptD.eqptTrnsCate) : mEqptD.eqptTrnsCate != null)
            return false;
        if (eqptIp != null ? !eqptIp.equals(mEqptD.eqptIp) : mEqptD.eqptIp != null) return false;
        if (dept != null ? !dept.equals(mEqptD.dept) : mEqptD.dept != null) return false;
        if (evtCate != null ? !evtCate.equals(mEqptD.evtCate) : mEqptD.evtCate != null) return false;
        if (evtUser != null ? !evtUser.equals(mEqptD.evtUser) : mEqptD.evtUser != null) return false;
        if (evtTimestamp != null ? !evtTimestamp.equals(mEqptD.evtTimestamp) : mEqptD.evtTimestamp != null)
            return false;
        if (evtNote != null ? !evtNote.equals(mEqptD.evtNote) : mEqptD.evtNote != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = eqptKey;
        result = 31 * result + (unqSeqId != null ? unqSeqId.hashCode() : 0);
        result = 31 * result + (etlTimestamp != null ? etlTimestamp.hashCode() : 0);
        result = 31 * result + (etlEventName != null ? etlEventName.hashCode() : 0);
        result = 31 * result + (etlEventNode != null ? etlEventNode.hashCode() : 0);
        result = 31 * result + (etlEvtSeqId != null ? etlEvtSeqId.hashCode() : 0);
        result = 31 * result + (shopKeyFk != null ? shopKeyFk.hashCode() : 0);
        result = 31 * result + (shopId != null ? shopId.hashCode() : 0);
        result = 31 * result + (eqptId != null ? eqptId.hashCode() : 0);
        result = 31 * result + (eqptDsc != null ? eqptDsc.hashCode() : 0);
        result = 31 * result + (unitTyp != null ? unitTyp.hashCode() : 0);
        result = 31 * result + (upEqptKey != null ? upEqptKey.hashCode() : 0);
        result = 31 * result + (upEqptId != null ? upEqptId.hashCode() : 0);
        result = 31 * result + (eqptCate != null ? eqptCate.hashCode() : 0);
        result = 31 * result + (floorCode != null ? floorCode.hashCode() : 0);
        result = 31 * result + (eqptTrnsCate != null ? eqptTrnsCate.hashCode() : 0);
        result = 31 * result + (eqptIp != null ? eqptIp.hashCode() : 0);
        result = 31 * result + (dept != null ? dept.hashCode() : 0);
        result = 31 * result + (evtCate != null ? evtCate.hashCode() : 0);
        result = 31 * result + (evtUser != null ? evtUser.hashCode() : 0);
        result = 31 * result + (evtTimestamp != null ? evtTimestamp.hashCode() : 0);
        result = 31 * result + (evtNote != null ? evtNote.hashCode() : 0);
        return result;
    }
}
